package com.ayq.activiti.model.config;

import org.activiti.spring.SpringProcessEngineConfiguration;
import org.activiti.spring.boot.ProcessEngineConfigurationConfigurer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;

/**
 *
 * <p>activiti配置文件</p>
 * @Author ayq
 * @Date 2021/3/5 10:28
 */
@Configuration
public class ActivitiConfig implements ProcessEngineConfigurationConfigurer {

    @Autowired
    private ActivitiIdGenerator ActivitiIdGenerator;

    /**
     *
     * <p>activiti主键生成策略</p>
     * <p>方法名:configure</p>
     * @Author ayq
     * @Date 2021/3/5 10:29
     * @Param [springProcessEngineConfiguration]
     * @Return void
     */
    @Override
    public void configure(SpringProcessEngineConfiguration springProcessEngineConfiguration) {
        springProcessEngineConfiguration.setIdGenerator(ActivitiIdGenerator);
    }



}
